-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add traffic permissions integration tests. #19008
Conversation
5f591b7
to
eb17a1e
Compare
var ctx context.Context | ||
rtestClient, ok := client.(*Client) | ||
if ok { | ||
ctx = rtestClient.Context(t) | ||
} else { | ||
ctx = testutil.TestContext(t) | ||
rtestClient = NewClient(client) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't particularly like this, but it's hard to do much better without making a breaking change that impacts tons and tons of tests.
client2EchoSuccess: true, | ||
}, | ||
// TODO I don't like this behavior. | ||
"allow one protocol doesnt impact the other protocol": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ishustava It feels weird to me that configuring a traffic permission with default allow only swaps to default deny for a single port rather than all port. Should we change this behavior to swap all ports to default deny?
eb17a1e
to
f72aead
Compare
f72aead
to
5719346
Compare
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
|
||
package tproxy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be trafficpermissions?
5719346
to
0a4366b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM. Can you add the comment in code that I mentioned? Once it is merged, I will reference it in the ticket that I create.
USER root | ||
|
||
RUN microdnf install -y iptables sudo nc \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a note for something like:
On Mac M1s when TProxy is enabled, consul-dataplane that are spawned from this image (only used in consul-container integration tests) will terminate with the below error. It is related to tproxy-startup.sh calling iptables SDK which then calls the underly iptables. We are investigating how this works on M1s with consul-envoy images which do not have this problem. For the time being tproxy tests on Mac M1s will fail locally but pass in CI.
Error setting up traffic redirection rules: failed to run command: /sbin/iptables -t nat -N CONSUL_PROXY_INBOUND, err: exit status 1, output: iptables: Failed to initialize nft: Protocol not supported
0a4366b
to
033594f
Compare
acaa084
to
53cf850
Compare
53cf850
to
6af4fe2
Compare
Add traffic permissions integration tests.
Description
Add integration tests for TCP traffic permissions.
PR Checklist